#include "qcustomplot.h"
#include <QObject>
#include <QList>

class qplot:public QCustomPlot
{
    Q_OBJECT

public:
    qplot(QWidget *parent = nullptr);
    QPen pen;
    QColor color ;

protected:


    void leaveEvent(QEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void wheelEvent(QWheelEvent *event);

private:
    QCPItemTracer *tracer= nullptr;
    QCPItemTracer *tracer_1= nullptr;
    QCPItemTracer *tracer_2= nullptr;
    QCPItemTracer *tracer_3= nullptr;
    QCPItemTracer *tracer_4= nullptr;
    QVector<QCPItemTracer> tracers;
    QCPItemStraightLine *arrowH = nullptr;
    QCPItemStraightLine *arrowV = nullptr;
    QPoint m_lastPoint;
    bool m_isPress = false;

    bool m_ctrlPress;
    bool m_alreadySaveRange;
    double m_xMin, m_xMax, m_yMin, m_yMax;
private slots:

};
